import HTMLTestRunner_PY3,yagmail
class Tools():
    #测试报告
    def Report(self):
        report=HTMLTestRunner_PY3.HTMLTestRunner(open('book.html','wb')

                                                 ,title='图书管理测试报告',description='共执行3条测试用例')
        return report
    #发送邮件
    def Mail(self):
        mail=yagmail.SMTP(user='2793453598@qq.com',password='fauupyapcthmdehc',host='smtp.qq.com',port=465)
        mail.send(to='2793453598@qq.com',subject='测试结果',contents=['book.html'])
        print('发送成功')
        mail.close()